import replace from 'postcss-replace';

export default {
  plugins: [
    replace({
      pattern: /:where\(([^)]+)\)/g,
      data: {
        // 将 :where(.xxx) 替换成 .xxx
        // 这是简单粗暴的移除
        match: ':where',
        test: /:where\(([^)]+)\)/,
        replace: (match, p1) => p1,
      },
    }),
  ],
};